<style>
    .mt10{
       margin-top: 10px;
    }
</style>
<section class="clearfix">
    <ul id="myTab" class="nav nav-tabs">
        @if(array_get($ways, 'app.is_open') == 'on')
            <li class="active"><a href="#APP" data-toggle="tab">APP</a></li>
        @endif
        @if(array_get($ways, 'wechat.is_open') == 'on')
            @if(array_get($ways, 'app.is_open') == 'on')
                <li><a href="#wechat" data-toggle="tab">微信</a></li>
            @endif
            @if(array_get($ways, 'app.is_open') == 'off')
                <li class="active"><a href="#wechat" data-toggle="tab">微信</a></li>
            @endif
        @endif
    </ul>
    <div id="myTabContent" class="tab-content">
        @if(array_get($ways, 'app.is_open') == 'on')
            <div class="tab-pane fade in active" id="APP">
                <div class="row mt10">
                    <div class="col-xs-offset-1 col-xs-10 text-center form-style1">
                        <div class="qrcode-img box-center border-ef pd10" data-text="{{$url}}"></div>
                        <div class="text-center f14 color-333 pt10">扫码预览</div>
                        <div class="pt20 qrcode-link box-center pos-relative">
                            <button class="btn-red color-white copyBtn" data-text="{{$url}}">复制</button>
                            <input type="text" class="form-control" readonly="" value="{{$url}}"></div>
                    </div>
                </div>
            </div>
        @endif
            @if(array_get($ways, 'wechat.is_open') == 'on')
                @if(array_get($ways, 'app.is_open') == 'on')
                    <div class="tab-pane fade" id="wechat">
                        {{--<div class="tab-pane fade" id="wechat">--}}
                        <div class="row mt10">
                            <div class="col-xs-offset-1 col-xs-10 text-center form-style1">
                                <div class="qrcode-img box-center border-ef pd10" data-text="{{$wechat}}">
                                </div>
                                <div class="text-center f14 color-333 pt10">扫码预览</div>
                                <div class="pt20 qrcode-link box-center pos-relative">
                                    <button class="btn-red color-white copyBtn" data-text="{{$wechat}}">
                                        复制
                                    </button>
                                    <input type="text" class="form-control" readonly=""
                                           value="{{$wechat}}"></div>
                            </div>
                        </div>
                    </div>
                @endif
                @if(array_get($ways, 'app.is_open') == 'off')
                        <div class="tab-pane fade in active" id="wechat">
                            {{--<div class="tab-pane fade" id="wechat">--}}
                            <div class="row mt10">
                                <div class="col-xs-offset-1 col-xs-10 text-center form-style1">
                                    <div class="qrcode-img box-center border-ef pd10" data-text="{{$wechat}}">
                                    </div>
                                    <div class="text-center f14 color-333 pt10">扫码预览</div>
                                    <div class="pt20 qrcode-link box-center pos-relative">
                                        <button class="btn-red color-white copyBtn" data-text="{{$wechat}}">
                                            复制
                                        </button>
                                        <input type="text" class="form-control" readonly=""
                                               value="{{$wechat}}"></div>
                                </div>
                            </div>
                        </div>
                @endif
            @endif
            @if(array_get($ways, 'app.is_open') == 'on'&&array_get($ways, 'wechat.is_open') == 'on')
                <div class="tab-pane fade" id="wechat">
                    @endif
            </div>
    </div>
</section>

<script src="/js/views/activity/qrcode.js"></script>
<script>
    $('#myTab li').on('click',function(e){
        var index = $(this).index();
        setTimeout(function () {
            utils.zclip($('.copyBtn')[index]);
            utils.qrcode($('.qrcode-img')[index],{height:180,width:180});
        },500);
    });
</script>
